package com.sciencep.pro.core.dao;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sciencep.pro.core.domain.dto.user.UserDetail;
import com.sciencep.pro.core.domain.dto.user.UserListRequestTO;
import com.sciencep.pro.core.domain.dto.user.UserListResponseTO;
import com.sciencep.pro.core.domain.entity.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author Sciencep
 */
public interface UserMapper extends BaseMapper<User> {


    /**
     * 用户列表
     * @param page
     * @param userListRequestTO
     * @return
     */
    Page<UserListResponseTO> getUserList(Page<UserListResponseTO> page, @Param("requestTO") UserListRequestTO userListRequestTO);

    /**
     * 获取用户详情
     * @param userId
     * @return
     */
    UserDetail getUserDetail(String userId);


    /** 获取用户按钮权限
     * @param userId
     * @return
     */
    List<String> getButtonIdsByUserId(String userId);

    boolean updateUser(User user);

    List<UserListResponseTO> getUserListByDeptId(Long deptId);

}
